package com.china08.yxyapi.repository.mg.continuedu;

import java.util.Date;
import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

import com.china08.yxyapi.entity.mg.continuedu.YxyContinueduUserTask;

public interface YxyContinueduUserTaskRepository extends MongoRepository<YxyContinueduUserTask, String> {

    List<YxyContinueduUserTask> findByUserIdAndStatusNot(String userId, int i);

    List<YxyContinueduUserTask> findByUserIdAndStatus(String userId, int i);

    List<YxyContinueduUserTask> findByUserId(String userId);

    YxyContinueduUserTask findByUserIdAndTaskId(String userId, String taskId);

    Page<YxyContinueduUserTask> findByUserId(String userId, Pageable pageable);

    Page<YxyContinueduUserTask> findByUserIdAndStatus(String userId, int i, Pageable pageable);

    Page<YxyContinueduUserTask> findByUserIdAndNameContaining(String userId, String keyword, Pageable pageable);

    Page<YxyContinueduUserTask> findByUserIdAndStatusAndNameContaining(String userId, int i, String keyword,
            Pageable pageable);

    List<YxyContinueduUserTask> findByStatusNotAndEndDateLessThan(int i, Date date);

    YxyContinueduUserTask findByUserIdAndTaskIdAndStatus(String userId, String taskId, int i);

}
